package com.kede.app.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @description /
* @author Pr.li
* @date 2023-10-14
**/
@Entity
@Data
@Table(name="t_package")
public class Package implements Serializable {
    /**
    * 包裹编号
    */
    @ApiModelProperty(value = "包裹编号")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    private Integer id;
    /**
    * 
    */
    @ApiModelProperty(value = "goodIds")
    @Column(name = "`good_ids`",nullable = false)
    @NotBlank
    private String goodIds;
    /**
    * 门店编号
    */
    @ApiModelProperty(value = "门店编号")
    @Column(name = "`store_id`")
    private Integer storeId;
    /**
    * 区代编号
    */
    @ApiModelProperty(value = "区代编号")
    @Column(name = "`qu_id`")
    private Integer quId;
    /**
    * 市代编号
    */
    @ApiModelProperty(value = "市代编号")
    @Column(name = "`shi_id`")
    private Integer shiId;
    /**
    * 
    */
    @ApiModelProperty(value = "cateName")
    @Column(name = "`cate_name`")
    private String cateName;
    /**
    * 包含的个数
    */
    @ApiModelProperty(value = "包含的个数")
    @Column(name = "`count`")
    private Integer count;
    /**
    * 门店名称
    */
    @ApiModelProperty(value = "门店名称")
    @Column(name = "`store_name`")
    private String storeName;
    /**
    * 区代名称
    */
    @ApiModelProperty(value = "区代名称")
    @Column(name = "`qu_name`")
    private String quName;
    /**
    * 市代名称
    */
    @ApiModelProperty(value = "市代名称")
    @Column(name = "`shi_name`")
    private String shiName;
    /**
    * 门店打包时间
    */
    @ApiModelProperty(value = "门店打包时间")
    @Column(name = "`store_create_time`")
    private Timestamp storeCreateTime;
    /**
    * 包裹状态 1正常 2待区代审核 3区代正常 4市代审核 5市代正常 6运输 7已分拣8区代拒绝9市代拒绝
    */
    @ApiModelProperty(value = "包裹状态 1正常 2待区代审核 3区代正常 4市代审核 5市代正常 6运输 7已分拣8区代拒绝9市代拒绝")
    @Column(name = "`status`")
    private Integer status;
    /**
    * 区代打包时间
    */
    @ApiModelProperty(value = "区代打包时间")
    @Column(name = "`qu_create_time`")
    private Timestamp quCreateTime;
    /**
    * 市代打包时间
    */
    @ApiModelProperty(value = "市代打包时间")
    @Column(name = "`shi_create_time`")
    private Timestamp shiCreateTime;
    /**
    * 运输编号
    */
    @ApiModelProperty(value = "运输编号")
    @Column(name = "`transport_no`")
    private String transportNo;
    /**
    * 原因说明
    */
    @ApiModelProperty(value = "原因说明")
    @Column(name = "`reason`")
    private String reason;

    public void copy(Package source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
